package com.party.core.service.gatherForm.biz;

import com.party.common.utils.SpringContextHolder;
import com.party.core.model.gatherForm.GatherFormInfo;
import com.party.core.service.gatherForm.IGatherFormInfoService;

/**
 * 表单帮助类
 */
public class GatherFormUtil {
    static IGatherFormInfoService gatherFormInfoService = SpringContextHolder.getBean(IGatherFormInfoService.class);

    /**
     * 获取每行指定列的值
     *
     * @param fieldId 列id
     * @param rowNo   行号
     * @return
     */
    public static String getFormInfo(String fieldId, Integer maxIndex) {
        GatherFormInfo gatherFormInfo = gatherFormInfoService.getFormInfoByField(fieldId, maxIndex);
        if (gatherFormInfo != null) {
            return gatherFormInfo.getFieldValue();
        }
        return "";
    }
}
